<div class="container">
    <h3 class="col s12 header center-align">Kong node configuration</h3>
    <div class="row">
        <form ng-submit="update()" name="configForm" class="col s8 offset-s2" novalidate>

            <div class="row">
                <div class="input-field col s12">
                    <input ng-model="config.url" placeholder="http://x.x.x.x:8001" id="kong_url" type="text">
                    <label for="kong_url" class="active">Kong node URL</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s12">
                    Authentication: <br>
                    <input ng-model="config.auth.type" name="auth_option" value="no_auth" type="radio" id="no_auth_option" />
                    <label for="no_auth_option">None</label>
                    <input ng-model="config.auth.type" name="auth_option" value="basic_auth" type="radio" id="basic_auth_option" />
                    <label for="basic_auth_option">Basic auth</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s6" ng-show="config.auth.type=='basic_auth'">
                    <input ng-model="config.auth.username" id="basic_auth_username" type="text">
                    <label for="basic_auth_username" ng-class="{active:config.auth.username}">Username</label>
                </div>
                <div class="input-field col s6" ng-show="config.auth.type=='basic_auth'">
                    <input ng-model="config.auth.password" id="basic_auth_password" type="password">
                    <label for="basic_auth_password" ng-class="{active:config.auth.password}">Password</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s12">
                    <input ng-model="config.gelato" name="gelato_option" type="checkbox" id="gelato_option" />
                    <label for="gelato_option">
                        Gelato Links for Consumers - If you're using Gelato, This will conditionally create shortcuts
                        links to the profile page of the same consumer on the gelato dashboard.
                    </label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s12">
                    <button type="submit" class="waves-effect waves-green btn right">Save</button>
                </div>
            </div>
        </form>
    </div>
</div>
